package com.template.entity;

import com.template.entity.content.Content;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * @author wangqi
 * @date 2024-01-16 10:39
 */
public class Paragraph {
    List<Content> content;

    public Paragraph() {
        this.content = new ArrayList<>();
    }

    public Paragraph(Content... contents) {
        this.content = new ArrayList<>();
        Collections.addAll(this.content, contents);
    }

    public Paragraph(List<Content> content) {
        this.content = content;
    }

    public Paragraph addContent(Content content) {
        this.content.add(content);
        return this;
    }

    public List<Content> getContent() {
        return content;
    }
}
